package domain.entities;

import domain.annotations.TableName;

import java.sql.Timestamp;

/**
 * 聊天消息实体
 *
 * @author wyl
 */
@TableName("T_ChatMessage")
public class ChatMessage {
    private Long id;
    private Long messageDate;
    private String content;
    private String userId;

    private ChatMessage() {

    }

    public ChatMessage(String content, String userId) {
        this.messageDate = System.currentTimeMillis();
        this.content = content;
        this.userId = userId;
    }

    public Long getId() {
        return id;
    }

    public Timestamp getMessageDate() {
        return new Timestamp(messageDate);
    }

    public String getContent() {
        return content;
    }

    public String getUserId() {
        return userId;
    }


}
